<template>
	<view class="personalInformation">
		<view class="" style="height: 160rpx;">
		<view class="mail_List fixed z_ninetynine">
			<view class="mail" style="font-weight: 700;">
				<view class="order" v-if="current==1">个人信息</view>
				<view class="order" v-if="current==2">个人信息修改</view>
			</view>
		</view>
		<view class="icon fixed z_ninetynine">
			<u-icon name="arrow-left" color="#fefefe" size="40" @click="navigateBack"></u-icon>
		</view>
			
		</view>
<!-- 		<view class="plus_circle">
			<u-icon name="plus-circle" size="120" @click="activities"></u-icon>
		</view> -->
		<view class="icon_one">
			<image src="/static/workOrder/plus.png" mode="" style="width: 100rpx; height: 100rpx;" @click="activities"></image>
			<!-- <u-icon name="plus-circle" color="#2979ff" size="120" @click="newworkOrder"></u-icon> -->
		</view>
		<!-- 报事人信息 -->
		<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">报事人信息</text>
		</view>
		<view class="card" style="padding: 0 42rpx;">
			<u-form :model="form" ref="uForm">
				<view class=""
					style="display: flex; justify-content: space-between; border-bottom: 1px solid #f6f7f9; padding: 40rpx 0 30rpx 0;">
					<text style="line-height: 70rpx;">头像:</text>
					<image :src="particulars.avatar" mode="" style="width: 70rpx;height: 70rpx;border-radius: 50%;">
					</image>
				</view>
				<view class=""
					style="display: flex; justify-content: space-between; border-bottom: 1px solid #f6f7f9; padding: 20rpx 0;">
					<text style="line-height: 70rpx;">姓名:</text>
					<view style="line-height: 70rpx; font-weight: 700;">{{particulars.nickName}}</view>
				</view>
				<u-form-item label="联系方式:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.phonenumber"
						:clearable="false" :disabled="true" />
				</u-form-item>
				<u-form-item label="性别:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.sex==0? '男' : '女'"
						:clearable="false" :disabled="true" />
				</u-form-item>
<!-- 				<u-form-item label="地址:">
					<u-input v-model="form.address" :custom-style="{'font-weight':'700'}" input-align="right" :disabled="disable" />
				</u-form-item> -->
			</u-form>
		</view>
		<!-- 工作信息 -->
		<view class="data_Statistics" style="padding: 44rpx 24rpx 0 ;">
			<text style="font-weight: 700; font-size: 30rpx; color: #c4c4c4;">丨</text><text
				style="font-weight: 700; font-size: 30rpx;">工作信息</text>
		</view>
		<view class="card" style="padding: 0 42rpx;">
			<u-form :model="form" ref="uForm">
				<u-form-item label="物业名称:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.deptName"
						:clearable="false" :disabled="true" />
				</u-form-item>
<!-- 				<u-form-item label="所属项目:">
					<u-input v-model="form.project" :custom-style="{'font-weight':'700'}" input-align="right" :disabled="disable" />
				</u-form-item>
				<u-form-item label="员工编号:">
					<u-input v-model="form.staff" :custom-style="{'font-weight':'700'}" input-align="right" :disabled="disable" />
				</u-form-item> -->
				<u-form-item label="职位类型:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="运营者"
						:clearable="false" :disabled="true" v-if="particulars.userType==00" />
						<u-input v-model="form.Reporter"
							placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="物业管理员"
							:clearable="false" :disabled="true" v-if="particulars.userType==10" />
							<u-input v-model="form.Reporter"
								placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="物业端自建人员"
								:clearable="false" :disabled="true" v-if="particulars.userType==00" />
								<u-input v-model="form.Reporter"
									placeholder-style="color: #000; text-align: right; font-weight: 600;" placeholder="物业端员工"
									:clearable="false" :disabled="true" v-if="particulars.userType==00" />
				</u-form-item>
				<u-form-item label="入职时间:">
					<u-input v-model="form.Reporter"
						placeholder-style="color: #000; text-align: right; font-weight: 600;" :placeholder="particulars.createTime"
						:clearable="false" :disabled="true" />
				</u-form-item>
			</u-form>
		</view>
		<view class="button_two" v-if="current==2">
			<u-button type="primary" style="flex: 1;" @click="resolved" v-if="current!==5&&current!==6">取消</u-button>
			<u-button type="success" style="flex: 1;" @click="Approved" v-if="current!==5&&current!==6">确定</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// form表单
				form: {
					contact: '',
					gender: '男',
					address: '安徽省合肥市蜀山区文艺.国际新城C4-305室',
					property: '华润物业',
					project: '旭辉.湖山原著',
					staff: '23176590',
					position: '物业管理人员',
					Induction: '2021-05-06'
				},
				current: 1,
				// 禁用输入框
				disable: true,
				// 车辆详情
				particulars:'',
			}
		},
		onLoad(val) {
			this.loginId  = uni.getStorageSync("setModel")
				this.getListVehicleByIds()
		},
		methods: {
			// 管理员待审核详情
			getListVehicleByIds() {
				this.$http.get('getUserById',{id:this.loginId.userId}).then(res => {
					this.particulars=res.data
					// this.form.Induction=res.data.createTime
					console.log(res, '管理员待审核详情')
					// this.owners = res.data
				})
			},
			// 图标按钮
			activities() {
				// 开启输入框
				this.disable = false
				this.current = 2
			},
			// 取消
			resolved() {

			},
			// 确定
			Approved() {

			},
			navigateBack() {
				if (this.current == 2) {
					this.current = 1
				} else {
					uni.navigateBack()
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.personalInformation {
		.mail_List {
			overflow: hidden;
			width: 100%;
			background-color: #f2f2f2;

			.mail {
				padding: 10rpx 0;
				// margin-top: 96rpx;
				color: #999999;
				font-size: 40rpx;
				background-color: #e5e5e5;
			}

			.order {
				text-align: center;
			}
		}

		.icon {
			position: absolute;
			top: 18rpx;
			left: 20rpx;
		}

		.icon_two {
			position: absolute;
			top: 18rpx;
			right: 20rpx;
		}

		/deep/.card {
			.u-form-item--left {
				flex: unset !important;
				width: unset !important;
			}
		}
		
		.icon_one {
			position: fixed;
			bottom: 300rpx;
			right: 10rpx;
			z-index: 999;
		}

		.button_two {
			display: flex;
			position: fixed;
			left: 0;
			right: 0;
			bottom: 0;
			// margin-top: 200rpx;
			border-radius: 14rpx;
			overflow: hidden;
			z-index: 9;

			.u-btn {
				border-radius: unset;
			}
		}
	}
</style>
